﻿using Newtonsoft.Json;

namespace XSot.BitBrowser.LocalApiClient.Model
{
    public class BitBrowserCookie
    {
        /// <summary>
        /// Cookie 名称
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; set; } = string.Empty;
        /// <summary>
        /// Cookie 值
        /// </summary>
        [JsonProperty("value")]
        public string Value { get; set; } = string.Empty;
        /// <summary>
        /// 域名
        /// </summary>
        [JsonProperty("domain")]
        public string? Domain { get; set; }
        /// <summary>
        /// 过期时间（必须为 number，不可为 null 或 undefined）
        /// </summary>
        [JsonProperty("expirationDate")]
        public double? ExpirationDate { get; set; }
        /// <summary>
        /// 是否仅限 HTTP 访问
        /// </summary>
        [JsonProperty("httpOnly")]
        public bool? HttpOnly { get; set; }
        /// <summary>
        /// 路径
        /// </summary>
        [JsonProperty("path")]
        public string? Path { get; set; }
        /// <summary>
        /// 是否仅限 HTTPS 访问
        /// </summary>
        [JsonProperty("secure")]
        public bool? Secure { get; set; }
        /// <summary>
        /// 是否为会话 Cookie
        /// </summary>
        [JsonProperty("session")]
        public bool? Session { get; set; }
        /// <summary>
        /// 存储 ID（可为 null）
        /// </summary>
        [JsonProperty("storeId")]
        public string? StoreId { get; set; }
        /// <summary>
        /// SameSite 属性（必须为标准值或不填此字段，不可为 0、null、false 等假值），"Strict"
        /// </summary>
        [JsonProperty("sameSite")]
        public string? SameSite { get; set; }
    }
}
